package com.ycb.bookserver.mapper;


import com.ycb.book.entity.ShoppingCart;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.mapstruct.Mapper;

import java.util.List;

@Mapper
public interface ShoppingCartMapper {

    @Select("select * from shoppingcart")
    List<ShoppingCart> AllShoppingCart();



    List<ShoppingCart> getPartShoppingCart(ShoppingCart shoppingCart);

    @Insert("insert into shoppingcart (user_id,name,image,price,create_time,update_time)" +
            "values " +
            "(#{user_id},#{name},#{image},#{price},#{createTime},#{updateTime})")
    void add(ShoppingCart shoppingCart);
}
